<?php
$connect = connexion ( SQLHOST, SQLUSER, SQLPASS, SQLDB );
$req = 'SELECT * FROM commande';
$result = extraire ( $connect, $req );
$row = mysql_fetch_array ( $result );
$num = @mysql_numrows ( $result );

include ('login.php');

if (isset ( $_SESSION ['login'] )) {
	// Si l'utilisateur n'a pas de commande
	if ($num > 0) {
		include ('consultation.php');
	} else {
		// Sinon afficher commande
		include ('nouvelleCommande.php');
	}
}

?>